/*
 * p1308.cpp
 *
 *  Created on: 2013-6-3
 *      Author: zy
 */
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
#define M_PI 3.14159265358979323846
#define sqr(v) ((v)*(v))
bool vis[101];
double my_acos(double d)
{
	return acos(d > 1 ? 1 : d < -1 ? -1 : d);
}
double my_sqrt(double d)
{
	return sqrt(max(d, 0.0));
}
int sig(double d)
{
	return fabs(d) < 1E-14 ? 0 : d > 0 ? 1 : -1;
}
struct Point
{
	double x, y;
	Point()
	{
	}
	Point(double x, double y) :
		x(x), y(y)
	{
	}
	Point resize(double d)
	{
		d /= my_sqrt(x * x + y * y);
		return Point(x * d, y * d);
	}
	//左转90度
	Point left90()
	{
		return Point(-y, x);
	}
	Point operator -(const Point & o) const
	{
		return Point(this->x - o.x, this->y - o.y);
	}
	Point operator +(const Point & o) const
	{
		return Point(this->x + o.x, this->y + o.y);
	}
	Point operator *(double d) const
	{
		return Point(x * d, y * d);
	}
	Point operator /(double d) const
	{
		return Point(x / d, y / d);
	}
	double A; //极角[0, 2*M_PI)

	void set(double A)
	{
		if (sig(A - 2 * M_PI) >= 0)
			A -= 2 * M_PI;
		else if (sig(A) < 0)
			A += 2 * M_PI;
		this->A = A;
	}
	void set(double x, double y)
	{
		this->x = x;
		this->y = y;
	}
};
struct Circle
{
	Point center;
	double radis;
	void read()
	{
		scanf("%lf%lf%lf", &center.x, &center.y, &radis);
	}
};
double dis(Point a, Point b)
{
	return my_sqrt(sqr(a.x-b.x) + sqr(a.y-b.y));
}
//------------圆与圆相交-----------------
//判断圆与圆相交
/* ab重合，返回0
 * a包含b，返回1
 * b包含a，返回-1
 * ab相离，返回2
 *
 + a内切b，返回3（a大）
 + b内切a，返回-3
 + ab外切，返回4
 + ab相交，返回5
 */
int intersect(Circle a, Circle b, Point &p1, Point &p2)
{
	double d = dis(a.center, b.center);
	int s1 = sig(d - fabs(a.radis - b.radis));
	int s2 = sig(d - fabs(a.radis + b.radis));
	if (sig(d) == 0 || s1 < 0)
		return sig(a.radis - b.radis); //重合/内含0/+-1
	if (s2 > 0)
		return 2; //相离2

	double t = (sqr(a.radis) + sqr(d) - sqr(b.radis)) / (2 * d); //t=cos(theta)*r1
	Point p = (b.center - a.center).resize(t) + a.center; //中间那个点
	Point vec = (b.center - a.center).left90().resize(my_sqrt(sqr(a.radis)
			-sqr(t)));
	p1 = p + vec;
	p2 = p - vec;

	if (s1 == 0)
		return 3 * sig(a.radis - b.radis); //内切+-3
	if (s2 == 0)
		return 4; //外切4
	return 5; //相交5
}

double cross(Point o, Point a, Point b)
{
	return (a.x - o.x) * (b.y - o.y) - (b.x - o.x) * (a.y - o.y);
}
double dot(Point o, Point a, Point b)
{
	return (a.x - o.x) * (b.x - o.x) + (a.y - o.y) * (b.y - o.y);
}

double radian(Point o, Point a, Point b)
{
	return my_acos(dot(o, a, b) / (dis(o, a) * dis(o, b)));
}

Point arc[10010];
Circle c[110];
bool enclose(Point p, Circle c)
{
	if (dis(p, c.center) < c.radis)
		return true;
	return false;
}
Point rotate(Point p, double radian)
{
	double c = cos(radian), s = sin(radian);
	Point ans;
	ans.set(p.x * c - p.y * s, p.y * c + p.x * s);
	return ans;
}
Point getMid(Point p1, Point p2, Circle c)
{
	Point o = c.center;
	Point ans, p0;
	p0.set(o.x + c.radis, o.y);
	double ang = (p1.A + p2.A) / 2;
	if (p1.A > p2.A)
		ang += M_PI;
	ans = rotate(p0 - o, ang) + o;
	return ans;
}
bool cmp(Point a, Point b)
{
	return a.A < b.A;
}
void judge(int k, int n)
{
	int cnt = 0;
	for (int i = 0; i < n; i++)
	{
		Point p1, p2;
		int d = intersect(c[k], c[i], p1, p2);
		if (d == 5)
		{
			p1.set(atan2(p1.y - c[k].center.y, p1.x - c[k].center.x));
			p2.set(atan2(p2.y - c[k].center.y, p2.x - c[k].center.x));
			arc[cnt++] = p1;
			arc[cnt++] = p2;
		}
	}
	sort(arc, arc + cnt, cmp);
	if(cnt==0)
	{
		Point p1,p2;
		p1.set(c[k].center.x+c[k].radis,c[k].center.y);
		p1.set(0);
		p2.set(c[k].center.x-c[k].radis,c[k].center.y);
		p2.set(M_PI);
		arc[cnt++]=p1;
		arc[cnt++]=p2;
	}
	arc[cnt] = arc[0];
	for (int i = 0; i < cnt; i++)
	{
		bool thisone = true;
		Point mid = getMid(arc[i], arc[i + 1], c[k]);
		for (int j = k + 1; j < n; j++)
			if (enclose(mid, c[j]))
			{
				thisone = false;
				break;
			}
		if (thisone)
		{
			vis[k] = 1;
			for (int j = k; j >= 0; j--)
				if (enclose(mid, c[j]))
				{
					vis[j] = 1;
					break;
				}
		}
	}
}
int work(int n)
{

	memset(vis, 0, sizeof(vis));
	vis[n - 1] = 1;
	for (int i = n - 1; i >= 0; i--)
		judge(i, n);
	int ans=0;
	for(int i=0;i<n;i++)
		ans+=vis[i];
	return ans;
}
int main()
{
	int n;
	while (scanf("%d", &n) && n)
	{
		for (int i = 0; i < n; i++)
			c[i].read();
		printf("%d\n", work(n));

	}
}
